package com.txts.road.app.user.model.dto;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 第三方登录表单对象
 *
 * @author baoyr
 * @since 2025-07-17 10:43
 */
@Getter
@Setter
@Schema(description = "第三方登录表单对象")
public class UserThirdAuthDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @NotNull(message = "主键ID不能为空")
    private Long id;

    @Schema(description = "用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "第三方类型：1-微信，2-QQ")
    @NotNull(message = "第三方类型：1-微信，2-QQ不能为空")
    private Integer thirdType;

    @Schema(description = "第三方用户ID")
    @NotBlank(message = "第三方用户ID不能为空")
    @Size(max=100, message="第三方用户ID长度不能超过100个字符")
    private String thirdUserId;

    @Schema(description = "第三方昵称")
    @Size(max=100, message="第三方昵称长度不能超过100个字符")
    private String thirdNickname;

    @Schema(description = "第三方头像")
    @Size(max=500, message="第三方头像长度不能超过500个字符")
    private String thirdAvatar;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;


}
